import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
 
     state: {
    mkdata: [{
          id: 1,
          src: require('@/images/mk1.png'),
          srcac: require('@/images/mk1ac.png'),
          srcwc: require('@/images/mkwc.png'),
          show: false
        },
        {
          id: 2,
          src: require('@/images/mk2.png'),
          srcac: require('@/images/mk2ac.png'),
          srcwc: require('@/images/mkwc.png'),
          show: false
        },
        {
          id: 3,
          src: require('@/images/mk3.png'),
          srcac: require('@/images/mk3ac.png'),
          srcwc: require('@/images/mkwc.png'),
          show: false
        }] // 这里定义您要存储的数据
  },
  
  getters: {getData: state => {
      return state.mkdata;
    }},
  mutations: {
     setData(state, newData) {
      state.mkdata = newData;
    }
  },
  actions: {
     updateData({ commit }, newData) {
      commit('setData', newData);
    }
  },
  modules: {},
});
